package com.aiapphub.SystemCode.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * AI对话会话实体
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("ai_conversation")
public class AiConversation {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 会话标题
     */
    @TableField("title")
    private String title;
    
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    
    /**
     * 会话状态：ACTIVE-活跃，ARCHIVED-已归档
     */
    @TableField("status")
    private String status;
    
    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;
    
    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    
    /**
     * 最后一条消息时间
     */
    @TableField("last_message_time")
    private LocalDateTime lastMessageTime;
    
    /**
     * 消息总数
     */
    @TableField("message_count")
    private Integer messageCount;
    
    /**
     * Dify会话ID
     */
    @TableField("dify_conversation_id")
    private String difyConversationId;
}
